/*      */ package btsm.bean;
/*      */ 
/*      */ import java.io.PrintStream;
/*      */ import java.sql.ResultSet;
/*      */ import java.sql.ResultSetMetaData;
/*      */ import java.text.SimpleDateFormat;
/*      */ import java.util.Date;
/*      */ 
/*      */ public class sqlBTSWork
/*      */ {
/*   15 */   String scsql = "";
/*   16 */   String addsql = "";
/*   17 */   String mdsql = "";
/*   18 */   String delsql = "";
/*   19 */   String strDQXSFilter = "5113%";
/*   20 */   public String tablesw = "";
/*   21 */   public String wheresw = "";
/*   22 */   public String idsw = "";
/*      */ 
/*   24 */   private dbConnector dbcon = null;
/*      */ 
/*      */   public sqlBTSWork(String tableswa, String idswa) {
/*   27 */     this.tablesw = tableswa;
/*   28 */     this.idsw = idswa;
/*   29 */     dbConInit();
/*      */   }
/*      */ 
/*      */   private void dbConInit() {
/*   33 */     if (this.dbcon == null)
/*   34 */       this.dbcon = new dbConnector();
/*      */   }
/*      */ 
/*      */   public void dbConClose() {
/*   38 */     if (this.dbcon != null)
/*   39 */       this.dbcon.closeAll();
/*   40 */     this.dbcon = null;
/*      */   }
/*      */ 
/*      */   public ResultSet scmeta()
/*      */     throws Exception
/*      */   {
/*   46 */     dbConInit();
/*      */ 
/*   48 */     this.scsql = ("select * from " + this.tablesw + " limit 1");
/*   49 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*      */ 
/*   51 */     return this.dbcon.execQuery(this.scsql);
/*      */   }
/*      */ 
/*      */   public int getUsersCountPage()
/*      */     throws Exception
/*      */   {
/*   57 */     dbConInit();
/*      */ 
/*   59 */     int count = 0;
/*   60 */     ResultSet rs = null;
/*   61 */     if ((this.idsw == null) || (this.idsw.equalsIgnoreCase("")))
/*   62 */       this.scsql = ("select count(username) as count from " + this.tablesw);
/*      */     else
/*   64 */       this.scsql = ("select count(id) as count from " + this.tablesw);
/*      */     try
/*      */     {
/*   67 */       this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*   68 */       rs = this.dbcon.execQuery(this.scsql);
/*   69 */       if (rs.next())
/*   70 */         count = rs.getInt(1);
/*      */     }
/*      */     catch (Exception e) {
/*   73 */       throw e;
/*      */     }
/*      */ 
/*   76 */     return count;
/*      */   }
/*      */ 
/*      */   public ResultSet scUsersPage(int ShowPagesw, int PageSizesw)
/*      */     throws Exception
/*      */   {
/*   82 */     dbConInit();
/*      */ 
/*   84 */     if ((this.idsw == null) || (this.idsw.equalsIgnoreCase("")))
/*   85 */       this.scsql = ("select * from " + this.tablesw + " where username <> 'system' order by username desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*      */     else {
/*   87 */       this.scsql = ("select * from " + this.tablesw + " where username <> 'system' order by id desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*      */     }
/*   89 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*   90 */     return this.dbcon.execQuery(this.scsql);
/*      */   }
/*      */ 
/*      */   public String[] meta(ResultSet rs) throws Exception
/*      */   {
/*   95 */     dbConInit();
/*      */ 
/*   97 */     ResultSetMetaData rsmd = rs.getMetaData();
/*   98 */     int columnCount = rsmd.getColumnCount();
/*   99 */     String[] cols = new String[columnCount];
/*  100 */     for (int i = 0; i < columnCount; i++) {
/*  101 */       cols[i] = rsmd.getColumnLabel(i + 1);
/*      */     }
/*      */ 
/*  104 */     return cols;
/*      */   }
/*      */ 
/*      */   public String[] metatype(ResultSet rs) throws Exception
/*      */   {
/*  109 */     dbConInit();
/*      */ 
/*  111 */     ResultSetMetaData rsmd = rs.getMetaData();
/*  112 */     int columnCount = rsmd.getColumnCount();
/*      */ 
/*  114 */     String[] coltype = new String[columnCount];
/*  115 */     for (int i = 0; i < columnCount; i++) {
/*  116 */       coltype[i] = rsmd.getColumnTypeName(i + 1);
/*      */     }
/*      */ 
/*  119 */     return coltype;
/*      */   }
/*      */ 
/*      */   public int getCountPage()
/*      */     throws Exception
/*      */   {
/*  125 */     dbConInit();
/*      */ 
/*  127 */     int count = 0;
/*  128 */     ResultSet rs = null;
/*  129 */     this.scsql = ("select count(btscode) as count from " + this.tablesw);
/*      */     try {
/*  131 */       this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*  132 */       rs = this.dbcon.execQuery(this.scsql);
/*  133 */       if (rs.next())
/*  134 */         count = rs.getInt(1);
/*      */     }
/*      */     catch (Exception e) {
/*  137 */       throw e;
/*      */     }
/*      */ 
/*  140 */     return count;
/*      */   }
/*      */ 
/*      */   public int getCableCountPage(String strbtscode)
/*      */     throws Exception
/*      */   {
/*  146 */     dbConInit();
/*      */ 
/*  148 */     int count = 0;
/*  149 */     ResultSet rs = null;
/*  150 */     this.scsql = ("select count(btscode) as count from " + this.tablesw + " where btscode = \"" + strbtscode + "\"");
/*      */     try {
/*  152 */       this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*  153 */       rs = this.dbcon.execQuery(this.scsql);
/*  154 */       if (rs.next())
/*  155 */         count = rs.getInt(1);
/*      */     }
/*      */     catch (Exception e) {
/*  158 */       throw e;
/*      */     }
/*      */ 
/*  161 */     return count;
/*      */   }
/*      */ 
/*      */   public int getCountPageBQuery(String strBFilter)
/*      */     throws Exception
/*      */   {
/*  167 */     dbConInit();
/*      */ 
/*  169 */     int count = 0;
/*  170 */     ResultSet rs = null;
/*      */ 
/*  172 */     ResultSet schemaRS = scmeta();
/*      */ 
/*  174 */     ResultSetMetaData rsmd = schemaRS.getMetaData();
/*  175 */     int columnCount = rsmd.getColumnCount();
/*  176 */     String[] cols = new String[columnCount];
/*      */ 
/*  178 */     this.scsql = ("select count(*) as count from " + this.tablesw + " where ");
/*      */ 
/*  180 */     for (int i = 0; i < columnCount; i++) {
/*  181 */       cols[i] = rsmd.getColumnLabel(i + 1);
/*      */ 
/*  183 */       if (i < columnCount - 1)
/*  184 */         this.scsql = (this.scsql + cols[i] + " like \"%" + strBFilter + "%\" or ");
/*      */       else {
/*  186 */         this.scsql = (this.scsql + cols[i] + " like \"%" + strBFilter + "%\"");
/*      */       }
/*      */     }
/*      */     try
/*      */     {
/*  191 */       this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*  192 */       rs = this.dbcon.execQuery(this.scsql);
/*  193 */       if (rs.next())
/*  194 */         count = rs.getInt(1);
/*      */     }
/*      */     catch (Exception e) {
/*  197 */       throw e;
/*      */     }
/*      */ 
/*  200 */     return count;
/*      */   }
/*      */ 
/*      */   public ResultSet scpage(int ShowPagesw, int PageSizesw)
/*      */     throws Exception
/*      */   {
/*  207 */     dbConInit();
/*      */ 
/*  209 */     if ((this.idsw == null) || (this.idsw.equalsIgnoreCase("")))
/*  210 */       this.scsql = ("select * from " + this.tablesw + " order by btscode desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*      */     else {
/*  212 */       this.scsql = ("select * from " + this.tablesw + " order by id desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*      */     }
/*  214 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*  215 */     return this.dbcon.execQuery(this.scsql);
/*      */   }
/*      */ 
/*      */   public ResultSet scPageByID(int ShowPagesw, int PageSizesw) throws Exception {
/*  219 */     dbConInit();
/*      */ 
/*  221 */     this.scsql = ("select * from " + this.tablesw + " order by id desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*  222 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*      */ 
/*  224 */     return this.dbcon.execQuery(this.scsql);
/*      */   }
/*      */ 
/*      */   public ResultSet scCablePage(int ShowPagesw, int PageSizesw)
/*      */     throws Exception
/*      */   {
/*  231 */     dbConInit();
/*      */ 
/*  233 */     if ((this.idsw == null) || (this.idsw.equalsIgnoreCase("")))
/*  234 */       this.scsql = ("select * from " + this.tablesw + " order by btscode desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*      */     else {
/*  236 */       this.scsql = ("select * from " + this.tablesw + " order by id desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*      */     }
/*  238 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*      */ 
/*  240 */     return this.dbcon.execQuery(this.scsql);
/*      */   }
/*      */ 
/*      */   public ResultSet scCableFPage(int ShowPagesw, int PageSizesw)
/*      */     throws Exception
/*      */   {
/*  247 */     dbConInit();
/*      */ 
/*  249 */     if ((this.idsw == null) || (this.idsw.equalsIgnoreCase("")))
/*  250 */       this.scsql = ("select * from " + this.tablesw + " where btscode = \"" + this.wheresw + "\" order by btscode desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*      */     else {
/*  252 */       this.scsql = ("select * from " + this.tablesw + " where btscode = \"" + this.wheresw + "\" order by id desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*      */     }
/*      */ 
/*  255 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*  256 */     System.out.println(this.scsql);
/*      */ 
/*  258 */     return this.dbcon.execQuery(this.scsql);
/*      */   }
/*      */ 
/*      */   public ResultSet scCableFPageByID(int ShowPagesw, int PageSizesw)
/*      */     throws Exception
/*      */   {
/*  265 */     dbConInit();
/*      */ 
/*  267 */     this.scsql = ("select * from " + this.tablesw + " where btscode = \"" + this.wheresw + "\" order by id desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*  268 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*  269 */     System.out.println(this.scsql);
/*      */ 
/*  271 */     return this.dbcon.execQuery(this.scsql);
/*      */   }
/*      */ 
/*      */   public ResultSet scCableMPage(int ShowPagesw, int PageSizesw)
/*      */     throws Exception
/*      */   {
/*  277 */     dbConInit();
/*      */ 
/*  279 */     if ((this.idsw == null) || (this.idsw.equalsIgnoreCase("")))
/*  280 */       this.scsql = ("select * from " + this.tablesw + " order by btscode desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*      */     else {
/*  282 */       this.scsql = ("select * from " + this.tablesw + " order by id desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*      */     }
/*  284 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*      */ 
/*  286 */     return this.dbcon.execQuery(this.scsql);
/*      */   }
/*      */ 
/*      */   public int getCountList(String dictype) throws Exception
/*      */   {
/*  291 */     dbConInit();
/*      */ 
/*  293 */     int count = 0;
/*  294 */     ResultSet rs = null;
/*  295 */     this.scsql = ("select count(dicname) from dictionary where dictype=\"" + dictype + '"');
/*      */     try {
/*  297 */       this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*  298 */       rs = this.dbcon.execQuery(this.scsql);
/*  299 */       if (rs.next())
/*  300 */         count = rs.getInt(1);
/*      */     }
/*      */     catch (Exception e) {
/*  303 */       throw e;
/*      */     }
/*      */ 
/*  306 */     return count;
/*      */   }
/*      */ 
/*      */   public String[] sclist(String dictype) throws Exception
/*      */   {
/*  311 */     dbConInit();
/*      */ 
/*  313 */     String[] list = new String[getCountList(dictype)];
/*  314 */     int i = 0;
/*  315 */     this.scsql = ("select dicname from dictionary  where dictype=\"" + dictype + '"');
/*  316 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*  317 */     ResultSet rs = this.dbcon.execQuery(this.scsql);
/*  318 */     while (rs.next()) {
/*  319 */       list[i] = rs.getString(1);
/*  320 */       i++;
/*      */     }
/*      */ 
/*  323 */     return list;
/*      */   }
/*      */ 
/*      */   public int getCountdqxsList() throws Exception
/*      */   {
/*  328 */     dbConInit();
/*      */ 
/*  330 */     int count = 0;
/*  331 */     ResultSet rs = null;
/*  332 */     this.scsql = ("select count(distcode) from districtcode where distcode like \"" + this.strDQXSFilter + "\"");
/*      */     try {
/*  334 */       this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*  335 */       rs = this.dbcon.execQuery(this.scsql);
/*  336 */       if (rs.next())
/*  337 */         count = rs.getInt(1);
/*      */     }
/*      */     catch (Exception e) {
/*  340 */       throw e;
/*      */     }
/*      */ 
/*  343 */     return count;
/*      */   }
/*      */ 
/*      */   public String[] scdqxslist() throws Exception
/*      */   {
/*  348 */     dbConInit();
/*      */ 
/*  350 */     String[] list = new String[getCountdqxsList()];
/*  351 */     int i = 0;
/*  352 */     this.scsql = ("select district from districtcode where distcode like \"" + this.strDQXSFilter + "\" order by distcode;");
/*  353 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*  354 */     ResultSet rs = this.dbcon.execQuery(this.scsql);
/*  355 */     while (rs.next()) {
/*  356 */       list[i] = rs.getString(1);
/*  357 */       i++;
/*      */     }
/*      */ 
/*  360 */     return list;
/*      */   }
/*      */ 
/*      */   public ResultSet sc() throws Exception
/*      */   {
/*  365 */     if (this.wheresw.equalsIgnoreCase(""))
/*  366 */       this.scsql = ("select * from " + this.tablesw);
/*  367 */     else if ((this.idsw == null) || (this.idsw.equalsIgnoreCase("")))
/*  368 */       this.scsql = ("select * from " + this.tablesw + " where btscode=" + '"' + this.wheresw + '"');
/*      */     else {
/*  370 */       this.scsql = ("select * from " + this.tablesw + " where id=" + '"' + this.wheresw + '"');
/*      */     }
/*  372 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*      */ 
/*  374 */     return this.dbcon.execQuery(this.scsql);
/*      */   }
/*      */ 
/*      */   public ResultSet oGTBQuery(String strBFilter) throws Exception
/*      */   {
/*  379 */     dbConInit();
/*      */ 
/*  381 */     strBFilter = new String(strBFilter.getBytes("ISO8859-1"), "gb2312");
/*      */ 
/*  385 */     String strquery = "select a.btscode, a.btsname, a.btszone, a.landform, a.lat, a.lng, a.btslevel, a.workingradius, b.road, b.distanceC, b.arrivaltimeC, b.distanceP, b.arrivaltimeP from geographicalenv a left join trafficinfo b on a.btscode = b.btscode where (a.btsname like '%" + strBFilter + "%' or a.btscode like '%" + strBFilter + "%');";
/*      */ 
/*  387 */     System.out.println("oGTBQuery:" + strquery);
/*      */ 
/*  389 */     return this.dbcon.execQuery(strquery);
/*      */   }
/*      */ 
/*      */   public ResultSet btsCNBQuery(String strBFilter) throws Exception
/*      */   {
/*  394 */     dbConInit();
/*      */ 
/*  396 */     strBFilter = new String(strBFilter.getBytes("ISO8859-1"), "gb2312");
/*      */ 
/*  398 */     String strquery = "select a.btscode, a.btsname, a.lat, a.lng from geographicalenv a where (a.btsname like '%" + strBFilter + "%' or a.btscode like '%" + strBFilter + "%');";
/*      */ 
/*  400 */     System.out.println("btsCNBQuery:" + strquery);
/*      */ 
/*  402 */     return this.dbcon.execQuery(strquery);
/*      */   }
/*      */ 
/*      */   public ResultSet BQuery(int ShowPagesw, int PageSizesw, int iType, String strBFilter)
/*      */     throws Exception
/*      */   {
/*  408 */     dbConInit();
/*      */ 
/*  410 */     ResultSet schemaRS = scmeta();
/*  411 */     ResultSetMetaData rsmd = schemaRS.getMetaData();
/*  412 */     int columnCount = rsmd.getColumnCount();
/*  413 */     String[] cols = new String[columnCount];
/*  414 */     String[] strBFilterArr = strBFilter.split(" ");
/*      */ 
/*  417 */     this.scsql = ("select * from " + this.tablesw + " where ");
/*  418 */     for (int j = 0; j < strBFilterArr.length; j++)
/*      */     {
/*  420 */       for (int i = 0; i < columnCount; i++) {
/*  421 */         cols[i] = rsmd.getColumnLabel(i + 1);
/*      */ 
/*  423 */         if (i < columnCount - 1) {
/*  424 */           this.scsql = (this.scsql + cols[i] + " like \"%" + strBFilterArr[j] + "%\" or ");
/*      */         }
/*  426 */         else if (j + 1 < strBFilterArr.length)
/*      */         {
/*  428 */           this.scsql = (this.scsql + cols[i] + " like \"%" + strBFilterArr[j] + "%\" or ");
/*      */         }
/*      */         else
/*      */         {
/*  432 */           this.scsql = (this.scsql + cols[i] + " like \"%" + strBFilterArr[j] + "%\" ");
/*      */         }
/*      */       }
/*      */ 
/*      */     }
/*      */ 
/*  438 */     if (iType == 0)
/*  439 */       this.scsql = (this.scsql + " order by btscode desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*      */     else {
/*  441 */       this.scsql = (this.scsql + " order by id desc limit " + (ShowPagesw - 1) * PageSizesw + "," + PageSizesw);
/*      */     }
/*      */ 
/*  444 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*  445 */     System.out.println("BQuery:" + this.scsql);
/*      */ 
/*  447 */     return this.dbcon.execQuery(this.scsql);
/*      */   }
/*      */ 
/*      */   public ResultSet BExpQuery(int iType, String strBFilter)
/*      */     throws Exception
/*      */   {
/*  453 */     dbConInit();
/*      */ 
/*  455 */     ResultSet schemaRS = scmeta();
/*  456 */     ResultSetMetaData rsmd = schemaRS.getMetaData();
/*  457 */     int columnCount = rsmd.getColumnCount();
/*  458 */     String[] cols = new String[columnCount];
/*      */ 
/*  460 */     this.scsql = ("select * from " + this.tablesw + " where ");
/*      */ 
/*  462 */     for (int i = 0; i < columnCount; i++) {
/*  463 */       cols[i] = rsmd.getColumnLabel(i + 1);
/*      */ 
/*  465 */       if (i < columnCount - 1)
/*  466 */         this.scsql = (this.scsql + cols[i] + " like \"%" + strBFilter + "%\" or ");
/*      */       else {
/*  468 */         this.scsql = (this.scsql + cols[i] + " like \"%" + strBFilter + "%\" ");
/*      */       }
/*      */     }
/*      */ 
/*  472 */     if (iType == 0)
/*  473 */       this.scsql += " order by btscode desc ";
/*      */     else {
/*  475 */       this.scsql += " order by id desc ";
/*      */     }
/*      */ 
/*  478 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/*  479 */     System.out.println("BExpQuery:" + this.scsql);
/*      */ 
/*  481 */     return this.dbcon.execQuery(this.scsql);
/*      */   }
/*      */ 
/*      */   public boolean add(String[] para)
/*      */   {
/*  486 */     dbConInit();
/*      */ 
/*  488 */     boolean flag = true;
/*      */ 
/*  490 */     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/*  491 */     String strCurDate = sdf.format(new Date());
/*  492 */     String strMeta = ""; String strValues = "";
/*      */ 
/*  494 */     String[] metaa = new String[para.length];
/*      */     try {
/*  496 */       metaa = meta(scmeta());
/*      */     } catch (Exception ex) {
/*  498 */       flag = false;
/*  499 */       ex.printStackTrace();
/*      */     }
/*      */ 
/*  502 */     for (int i = 0; i < para.length - 1; i++) {
/*  503 */       if (!metaa[i].equalsIgnoreCase("id"))
/*      */       {
/*  505 */         if (metaa[i].equalsIgnoreCase("refreshtime")) {
/*  506 */           strMeta = strMeta + metaa[i] + ", ";
/*  507 */           strValues = strValues + '"' + strCurDate + "\",";
/*  508 */         } else if ((para[i].equalsIgnoreCase("")) || (para[i].equals("null"))) {
/*  509 */           strMeta = strMeta + metaa[i] + ", ";
/*  510 */           strValues = strValues + "\"\",";
/*  511 */         } else if (metaa[i].equalsIgnoreCase("passwd")) {
/*  512 */           strMeta = strMeta + metaa[i] + ", ";
/*  513 */           strValues = strValues + "password(\"" + para[i] + "\"), ";
/*      */         } else {
/*  515 */           strMeta = strMeta + metaa[i] + ", ";
/*  516 */           strValues = strValues + '"' + para[i] + "\",";
/*      */         }
/*      */       }
/*      */     }
/*  520 */     if (metaa[(para.length - 1)].equalsIgnoreCase("refreshtime")) {
/*  521 */       strMeta = strMeta + metaa[(para.length - 1)];
/*  522 */       strValues = strValues + '"' + strCurDate + "\"";
/*  523 */     } else if ((para[(para.length - 1)].equalsIgnoreCase("")) || (para[(para.length - 1)].equals("null"))) {
/*  524 */       strMeta = strMeta + metaa[(para.length - 1)];
/*  525 */       strValues = strValues + "\"\"";
/*  526 */     } else if (metaa[(para.length - 1)].equalsIgnoreCase("passwd")) {
/*  527 */       strMeta = strMeta + metaa[(para.length - 1)];
/*  528 */       strValues = strValues + "password(\"" + para[(para.length - 1)] + "\")";
/*      */     } else {
/*  530 */       strMeta = strMeta + metaa[(para.length - 1)];
/*  531 */       strValues = strValues + '"' + para[(para.length - 1)] + "\"";
/*      */     }
/*      */ 
/*  534 */     this.addsql = ("insert into " + this.tablesw + "(" + strMeta + ") values(" + strValues + ")");
/*      */     try
/*      */     {
/*  537 */       this.addsql = new String(this.addsql.getBytes("ISO8859-1"), "UTF-8");
/*  538 */       System.out.println(this.addsql);
/*  539 */       this.dbcon.execUpdate(this.addsql);
/*      */     } catch (Exception ex) {
/*  541 */       flag = false;
/*  542 */       ex.printStackTrace();
/*      */     }
/*  544 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean InsertRD(String[] para)
/*      */   {
/*  550 */     dbConInit();
/*      */ 
/*  552 */     boolean flag = true;
/*      */ 
/*  554 */     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/*  555 */     String strCurDate = sdf.format(new Date());
/*  556 */     String strMeta = ""; String strValues = "";
/*      */ 
/*  558 */     String[] metaa = new String[para.length];
/*      */     try {
/*  560 */       metaa = meta(scmeta());
/*      */     } catch (Exception ex) {
/*  562 */       flag = false;
/*  563 */       ex.printStackTrace();
/*      */     }
/*      */ 
/*  566 */     for (int i = 0; i < para.length - 1; i++) {
/*  567 */       if (!metaa[i].equalsIgnoreCase("id"))
/*      */       {
/*  569 */         if (metaa[i].equalsIgnoreCase("refreshtime")) {
/*  570 */           strMeta = strMeta + metaa[i] + ", ";
/*  571 */           strValues = strValues + '"' + strCurDate + "\",";
/*  572 */         } else if ((para[i].equalsIgnoreCase("")) || (para[i].equals("null"))) {
/*  573 */           strMeta = strMeta + metaa[i] + ", ";
/*  574 */           strValues = strValues + "\"\",";
/*  575 */         } else if (metaa[i].equalsIgnoreCase("passwd")) {
/*  576 */           strMeta = strMeta + metaa[i] + ", ";
/*  577 */           strValues = strValues + "password(\"" + para[i] + "\"), ";
/*      */         } else {
/*  579 */           strMeta = strMeta + metaa[i] + ", ";
/*  580 */           strValues = strValues + '"' + para[i] + "\",";
/*      */         }
/*      */       }
/*      */     }
/*  584 */     if (metaa[(para.length - 1)].equalsIgnoreCase("refreshtime")) {
/*  585 */       strMeta = strMeta + metaa[(para.length - 1)];
/*  586 */       strValues = strValues + '"' + strCurDate + "\"";
/*  587 */     } else if ((para[(para.length - 1)].equalsIgnoreCase("")) || (para[(para.length - 1)].equals("null"))) {
/*  588 */       strMeta = strMeta + metaa[(para.length - 1)];
/*  589 */       strValues = strValues + "\"\"";
/*  590 */     } else if (metaa[(para.length - 1)].equalsIgnoreCase("passwd")) {
/*  591 */       strMeta = strMeta + metaa[(para.length - 1)];
/*  592 */       strValues = strValues + "password(\"" + para[(para.length - 1)] + "\")";
/*      */     } else {
/*  594 */       strMeta = strMeta + metaa[(para.length - 1)];
/*  595 */       strValues = strValues + '"' + para[(para.length - 1)] + "\"";
/*      */     }
/*      */ 
/*  598 */     this.addsql = ("insert into " + this.tablesw + "(" + strMeta + ") values(" + strValues + ")");
/*      */     try
/*      */     {
/*  601 */       this.addsql = new String(this.addsql.getBytes("ISO8859-1"), "UTF-8");
/*  602 */       System.out.println(this.addsql);
/*  603 */       this.dbcon.execUpdate(this.addsql);
/*      */     } catch (Exception ex) {
/*  605 */       flag = false;
/*  606 */       ex.printStackTrace();
/*      */     }
/*  608 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean insertsimple(String strbtscode, String strbtsname)
/*      */   {
/*  614 */     dbConInit();
/*      */ 
/*  616 */     boolean flag = true;
/*  617 */     this.addsql = ("insert into " + this.tablesw + " (btscode, btsname) values(\"" + strbtscode + "\",\"" + strbtsname + "\")");
/*      */     try
/*      */     {
/*  620 */       this.addsql = new String(this.addsql.getBytes("ISO8859-1"), "UTF-8");
/*  621 */       System.out.println(this.addsql);
/*  622 */       this.dbcon.execUpdate(this.addsql);
/*      */     } catch (Exception ex) {
/*  624 */       flag = false;
/*  625 */       ex.printStackTrace();
/*      */     }
/*  627 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean insertIntercon(String strconname, String strconurl)
/*      */   {
/*  633 */     dbConInit();
/*      */ 
/*  635 */     boolean flag = true;
/*  636 */     this.addsql = ("insert into " + this.tablesw + " (isname, isurl) values(\"" + strconname + "\",\"" + strconurl + "\")");
/*      */     try
/*      */     {
/*  639 */       this.addsql = new String(this.addsql.getBytes("ISO8859-1"), "UTF-8");
/*  640 */       System.out.println(this.addsql);
/*  641 */       this.dbcon.execUpdate(this.addsql);
/*      */     } catch (Exception ex) {
/*  643 */       flag = false;
/*  644 */       ex.printStackTrace();
/*      */     }
/*  646 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean insertMD(String[] para, String strID) {
/*  650 */     dbConInit();
/*      */ 
/*  652 */     boolean flag = true;
/*  653 */     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/*  654 */     String strCurDate = sdf.format(new Date());
/*      */ 
/*  656 */     String[] metaa = new String[para.length];
/*      */     try {
/*  658 */       metaa = meta(scmeta());
/*      */     } catch (Exception ex) {
/*  660 */       flag = false;
/*  661 */       ex.printStackTrace();
/*      */     }
/*      */ 
/*  664 */     this.mdsql = ("insert into " + this.tablesw + " ( dictype , diccode, dicname) values(");
/*  665 */     for (int i = 1; i < para.length; i++) {
/*  666 */       if (i < para.length) {
/*  667 */         this.mdsql = (this.mdsql + "'" + para[i] + "'");
/*      */       }
/*  669 */       if (i < para.length - 1)
/*      */       {
/*  671 */         this.mdsql += ",";
/*      */       }
/*      */     }
/*  674 */     this.mdsql += ")";
/*      */     try
/*      */     {
/*  677 */       this.mdsql = new String(this.mdsql.getBytes("ISO8859-1"), "UTF-8");
/*  678 */       System.out.println(this.mdsql);
/*  679 */       this.dbcon.execUpdate(this.mdsql);
/*      */     } catch (Exception ex) {
/*  681 */       flag = false;
/*  682 */       ex.printStackTrace();
/*      */     }
/*  684 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean insertTubewell(String strtwcode, String strtwname)
/*      */   {
/*  689 */     dbConInit();
/*      */ 
/*  691 */     boolean flag = true;
/*  692 */     this.addsql = ("insert into " + this.tablesw + " (twcode, twname) values(\"" + strtwcode + "\",\"" + strtwname + "\")");
/*      */     try
/*      */     {
/*  695 */       this.addsql = new String(this.addsql.getBytes("ISO8859-1"), "UTF-8");
/*  696 */       System.out.println(this.addsql);
/*  697 */       this.dbcon.execUpdate(this.addsql);
/*      */     } catch (Exception ex) {
/*  699 */       flag = false;
/*  700 */       ex.printStackTrace();
/*      */     }
/*  702 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean insertPsect(String strtwname)
/*      */   {
/*  707 */     dbConInit();
/*      */ 
/*  709 */     boolean flag = true;
/*  710 */     this.addsql = ("insert into " + this.tablesw + " (psname) values(\"" + strtwname + "\")");
/*      */     try
/*      */     {
/*  713 */       this.addsql = new String(this.addsql.getBytes("ISO8859-1"), "UTF-8");
/*  714 */       System.out.println(this.addsql);
/*  715 */       this.dbcon.execUpdate(this.addsql);
/*      */     } catch (Exception ex) {
/*  717 */       flag = false;
/*  718 */       ex.printStackTrace();
/*      */     }
/*  720 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean md(String[] para)
/*      */   {
/*  725 */     dbConInit();
/*      */ 
/*  727 */     boolean flag = true;
/*  728 */     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/*  729 */     String strCurDate = sdf.format(new Date());
/*      */ 
/*  731 */     String[] metaa = new String[para.length];
/*      */     try {
/*  733 */       metaa = meta(scmeta());
/*      */     } catch (Exception ex) {
/*  735 */       flag = false;
/*  736 */       ex.printStackTrace();
/*      */     }
/*      */ 
/*  739 */     if ((this.idsw == null) || (this.idsw.equalsIgnoreCase(""))) {
/*  740 */       this.mdsql = ("update " + this.tablesw + " set ");
/*  741 */       for (int i = 0; i < para.length; i++) {
/*  742 */         if (i < para.length - 1) {
/*  743 */           if (metaa[i].equalsIgnoreCase("refreshtime"))
/*  744 */             this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + strCurDate + '"' + ',');
/*  745 */           else if ((para[i].equalsIgnoreCase("")) || (para[i].equals("null")))
/*  746 */             this.mdsql = (this.mdsql + metaa[i] + "=\"\",");
/*      */           else {
/*  748 */             this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + para[i] + '"' + ',');
/*      */           }
/*      */         }
/*  751 */         else if (metaa[i].equalsIgnoreCase("refreshtime"))
/*  752 */           this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + strCurDate + '"' + ' ');
/*  753 */         else if ((para[i].equalsIgnoreCase("")) || (para[i].equals("null")))
/*  754 */           this.mdsql = (this.mdsql + metaa[i] + "=\"\" ");
/*      */         else {
/*  756 */           this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + para[i] + '"' + ' ');
/*      */         }
/*      */       }
/*      */ 
/*  760 */       this.mdsql = (this.mdsql + " where btscode=" + '"' + this.wheresw + '"');
/*      */     } else {
/*  762 */       this.mdsql = ("update " + this.tablesw + " set ");
/*  763 */       for (int i = 1; i < para.length; i++) {
/*  764 */         if (i < para.length - 1) {
/*  765 */           if (metaa[i].equalsIgnoreCase("refreshtime"))
/*  766 */             this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + strCurDate + '"' + ',');
/*  767 */           else if ((para[i].equalsIgnoreCase("")) || (para[i].equals("null")))
/*  768 */             this.mdsql = (this.mdsql + metaa[i] + "=\"\", ");
/*      */           else {
/*  770 */             this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + para[i] + '"' + ',');
/*      */           }
/*      */         }
/*  773 */         else if (metaa[i].equalsIgnoreCase("refreshtime"))
/*  774 */           this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + strCurDate + '"' + ' ');
/*  775 */         else if ((para[i].equalsIgnoreCase("")) || (para[i].equals("null")))
/*  776 */           this.mdsql = (this.mdsql + metaa[i] + "=\"\" ");
/*      */         else {
/*  778 */           this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + para[i] + '"' + ' ');
/*      */         }
/*      */       }
/*      */ 
/*  782 */       this.mdsql = (this.mdsql + " where id=" + '"' + this.wheresw + '"');
/*      */     }
/*      */     try {
/*  785 */       this.mdsql = new String(this.mdsql.getBytes("ISO8859-1"), "UTF-8");
/*  786 */       System.out.println(this.mdsql);
/*  787 */       this.dbcon.execUpdate(this.mdsql);
/*      */     } catch (Exception ex) {
/*  789 */       flag = false;
/*  790 */       ex.printStackTrace();
/*      */     }
/*  792 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean mdByBTSCode(String[] para, String strBTSCode)
/*      */   {
/*  798 */     dbConInit();
/*      */ 
/*  800 */     boolean flag = true;
/*  801 */     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/*  802 */     String strCurDate = sdf.format(new Date());
/*      */ 
/*  804 */     String[] metaa = new String[para.length];
/*      */     try {
/*  806 */       metaa = meta(scmeta());
/*      */     } catch (Exception ex) {
/*  808 */       flag = false;
/*  809 */       ex.printStackTrace();
/*      */     }
/*      */ 
/*  812 */     this.mdsql = ("update " + this.tablesw + " set ");
/*  813 */     for (int i = 1; i < para.length; i++) {
/*  814 */       if (i < para.length - 1) {
/*  815 */         if (metaa[i].equalsIgnoreCase("refreshtime"))
/*  816 */           this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + strCurDate + '"' + ',');
/*  817 */         else if ((para[i].equalsIgnoreCase("")) || (para[i].equals("null")))
/*  818 */           this.mdsql = (this.mdsql + metaa[i] + "=\"\", ");
/*      */         else {
/*  820 */           this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + para[i] + '"' + ',');
/*      */         }
/*      */       }
/*  823 */       else if (metaa[i].equalsIgnoreCase("refreshtime"))
/*  824 */         this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + strCurDate + '"' + ' ');
/*  825 */       else if ((para[i].equalsIgnoreCase("")) || (para[i].equals("null")))
/*  826 */         this.mdsql = (this.mdsql + metaa[i] + "=\"\" ");
/*      */       else {
/*  828 */         this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + para[i] + '"' + ' ');
/*      */       }
/*      */     }
/*      */ 
/*  832 */     this.mdsql = (this.mdsql + " where btscode=" + '"' + strBTSCode + '"');
/*      */     try
/*      */     {
/*  835 */       this.mdsql = new String(this.mdsql.getBytes("ISO8859-1"), "UTF-8");
/*  836 */       System.out.println(this.mdsql);
/*  837 */       this.dbcon.execUpdate(this.mdsql);
/*      */     } catch (Exception ex) {
/*  839 */       flag = false;
/*  840 */       ex.printStackTrace();
/*      */     }
/*  842 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean mdAddByBTSCode(String[] para, String strBTSCode, String moduleFlag) {
/*  846 */     dbConInit();
/*      */ 
/*  848 */     boolean flag = true;
/*  849 */     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/*  850 */     String strCurDate = sdf.format(new Date());
/*      */ 
/*  852 */     String[] metaa = new String[para.length];
/*      */     try {
/*  854 */       metaa = meta(scmeta());
/*      */     } catch (Exception ex) {
/*  856 */       flag = false;
/*  857 */       ex.printStackTrace();
/*      */     }
/*      */ 
/*  860 */     this.mdsql = ("update " + this.tablesw + " set ");
/*  861 */     if (moduleFlag.equalsIgnoreCase("graph"))
/*      */     {
/*  863 */       this.mdsql = (this.mdsql + " graphDeatilAddr" + '=' + '"' + para[0] + '"');
/*  864 */       this.mdsql = (this.mdsql + ',' + " graphHigh" + '=' + '"' + para[1] + '"');
/*      */     }
/*  866 */     this.mdsql = (this.mdsql + " where btscode=" + '"' + strBTSCode + '"');
/*      */     try
/*      */     {
/*  869 */       this.mdsql = new String(this.mdsql.getBytes("ISO8859-1"), "UTF-8");
/*  870 */       System.out.println(this.mdsql);
/*  871 */       this.dbcon.execUpdate(this.mdsql);
/*      */     } catch (Exception ex) {
/*  873 */       flag = false;
/*  874 */       ex.printStackTrace();
/*      */     }
/*  876 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean mdByID(String[] para, String strID)
/*      */   {
/*  882 */     dbConInit();
/*      */ 
/*  884 */     boolean flag = true;
/*  885 */     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/*  886 */     String strCurDate = sdf.format(new Date());
/*      */ 
/*  888 */     String[] metaa = new String[para.length];
/*      */     try {
/*  890 */       metaa = meta(scmeta());
/*      */     } catch (Exception ex) {
/*  892 */       flag = false;
/*  893 */       ex.printStackTrace();
/*      */     }
/*      */ 
/*  896 */     this.mdsql = ("update " + this.tablesw + " set ");
/*  897 */     for (int i = 1; i < para.length; i++) {
/*  898 */       if (i < para.length - 1) {
/*  899 */         if (metaa[i].equalsIgnoreCase("refreshtime"))
/*  900 */           this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + strCurDate + '"' + ',');
/*  901 */         else if ((para[i].equalsIgnoreCase("")) || (para[i].equals("null")))
/*  902 */           this.mdsql = (this.mdsql + metaa[i] + "=\"\", ");
/*      */         else {
/*  904 */           this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + para[i] + '"' + ',');
/*      */         }
/*      */       }
/*  907 */       else if (metaa[i].equalsIgnoreCase("refreshtime"))
/*  908 */         this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + strCurDate + '"' + ' ');
/*  909 */       else if ((para[i].equalsIgnoreCase("")) || (para[i].equals("null")))
/*  910 */         this.mdsql = (this.mdsql + metaa[i] + "=\"\" ");
/*      */       else {
/*  912 */         this.mdsql = (this.mdsql + metaa[i] + "=" + '"' + para[i] + '"' + ' ');
/*      */       }
/*      */     }
/*      */ 
/*  916 */     this.mdsql = (this.mdsql + " where id=" + '"' + strID + '"');
/*      */ 
/*  918 */     System.out.println("Update:" + this.mdsql);
/*      */     try
/*      */     {
/*  921 */       this.mdsql = new String(this.mdsql.getBytes("ISO8859-1"), "UTF-8");
/*  922 */       System.out.println(this.mdsql);
/*  923 */       this.dbcon.execUpdate(this.mdsql);
/*      */     } catch (Exception ex) {
/*  925 */       flag = false;
/*  926 */       ex.printStackTrace();
/*      */     }
/*  928 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean mdAddByID(String[] para, String strID, String moduleFlag)
/*      */   {
/*  934 */     dbConInit();
/*      */ 
/*  936 */     boolean flag = true;
/*  937 */     SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
/*  938 */     String strCurDate = sdf.format(new Date());
/*      */ 
/*  940 */     this.mdsql = ("update " + this.tablesw + " set ");
/*  941 */     if (moduleFlag.equalsIgnoreCase("bts"))
/*      */     {
/*  943 */       this.mdsql = (this.mdsql + "sbtstype" + '=' + '"' + para[0] + '"');
/*  944 */       this.mdsql = (this.mdsql + ',' + " isgovandarm" + '=' + '"' + para[1] + '"');
/*  945 */       this.mdsql = (this.mdsql + ',' + " ismainoroth" + '=' + '"' + para[2] + '"');
/*      */     }
/*  947 */     else if (moduleFlag.equalsIgnoreCase("hunder"))
/*      */     {
/*  949 */       this.mdsql = (this.mdsql + "hunderPowerType" + '=' + '"' + para[0] + '"');
/*  950 */       this.mdsql = (this.mdsql + ',' + " hunderWorkSta" + '=' + '"' + para[1] + '"');
/*  951 */       this.mdsql = (this.mdsql + ',' + " hunderLineLen" + '=' + '"' + para[2] + '"');
/*      */     }
/*  953 */     else if (moduleFlag.equalsIgnoreCase("tran"))
/*      */     {
/*  955 */       this.mdsql = (this.mdsql + "tranPowerType" + '=' + '"' + para[0] + '"');
/*  956 */       this.mdsql = (this.mdsql + ',' + " tranMaintain" + '=' + '"' + para[1] + '"');
/*  957 */       this.mdsql = (this.mdsql + ',' + " tranHighLen" + '=' + '"' + para[2] + '"');
/*  958 */       this.mdsql = (this.mdsql + ',' + " tranLowLen" + '=' + '"' + para[3] + '"');
/*  959 */       this.mdsql = (this.mdsql + ',' + " tranRValue" + '=' + '"' + para[4] + '"');
/*  960 */       this.mdsql = (this.mdsql + ',' + " tranStartTime" + '=' + '"' + para[5] + '"');
/*      */     }
/*  962 */     else if (moduleFlag.equalsIgnoreCase("trans"))
/*      */     {
/*  964 */       this.mdsql = (this.mdsql + "2MUseSta" + '=' + '"' + para[0] + '"');
/*  965 */       this.mdsql = (this.mdsql + ',' + " isPowerAlone" + '=' + '"' + para[1] + '"');
/*      */     }
/*  967 */     else if (moduleFlag.equalsIgnoreCase("pbox"))
/*      */     {
/*  969 */       this.mdsql = (this.mdsql + "pboxOutI" + '=' + '"' + para[0] + '"');
/*  970 */       this.mdsql = (this.mdsql + ',' + " pboxNum" + '=' + '"' + para[1] + '"');
/*  971 */       this.mdsql = (this.mdsql + ',' + " pboxWorkSta" + '=' + '"' + para[2] + '"');
/*      */     }
/*  973 */     else if (moduleFlag.equalsIgnoreCase("montor"))
/*      */     {
/*  975 */       this.mdsql = (this.mdsql + " monWorkSta" + '=' + '"' + para[0] + '"');
/*      */     }
/*  977 */     else if (moduleFlag.equalsIgnoreCase("dynamo"))
/*      */     {
/*  979 */       this.mdsql = (this.mdsql + " dynamoIsStatic" + '=' + '"' + para[0] + '"');
/*  980 */       this.mdsql = (this.mdsql + ',' + " danymoSeiral" + '=' + '"' + para[1] + '"');
/*  981 */       this.mdsql = (this.mdsql + ',' + " dynamoWorkLen" + '=' + '"' + para[2] + '"');
/*  982 */       this.mdsql = (this.mdsql + ',' + " dynamoMaintainRec" + '=' + '"' + para[3] + '"');
/*      */     }
/*  984 */     else if (moduleFlag.equalsIgnoreCase("mroom"))
/*      */     {
/*  986 */       this.mdsql = (this.mdsql + " mroomIsLook" + '=' + '"' + para[0] + '"');
/*  987 */       this.mdsql = (this.mdsql + ',' + " mroomLookTel" + '=' + '"' + para[1] + '"');
/*      */     }
/*  989 */     else if (moduleFlag.equalsIgnoreCase("airc"))
/*      */     {
/*  991 */       this.mdsql = (this.mdsql + " aircPowerType" + '=' + '"' + para[0] + '"');
/*  992 */       this.mdsql = (this.mdsql + ',' + " aircType" + '=' + '"' + para[1] + '"');
/*  993 */       this.mdsql = (this.mdsql + ',' + " aircInSideSize" + '=' + '"' + para[2] + '"');
/*  994 */       this.mdsql = (this.mdsql + ',' + " aircOutSideSize" + '=' + '"' + para[3] + '"');
/*      */     }
/*  996 */     else if (moduleFlag.equalsIgnoreCase("firee"))
/*      */     {
/*  998 */       this.mdsql = (this.mdsql + " fireeType" + '=' + '"' + para[0] + '"');
/*  999 */       this.mdsql = (this.mdsql + ',' + " fireeIsEff" + '=' + '"' + para[1] + '"');
/*      */     }
/* 1001 */     else if (moduleFlag.equalsIgnoreCase("ante"))
/*      */     {
/* 1003 */       this.mdsql = (this.mdsql + " anteIsMakeAng" + '=' + '"' + para[0] + '"');
/* 1004 */       this.mdsql = (this.mdsql + ',' + " anteDicAng" + '=' + '"' + para[1] + '"');
/* 1005 */       this.mdsql = (this.mdsql + ',' + " anteUpAng" + '=' + '"' + para[2] + '"');
/*      */     }
/* 1007 */     else if (moduleFlag.equalsIgnoreCase("itower"))
/*      */     {
/* 1009 */       this.mdsql = (this.mdsql + " itowerPlatNum" + '=' + '"' + para[0] + '"');
/* 1010 */       this.mdsql = (this.mdsql + ',' + " itowerSta" + '=' + '"' + para[1] + '"');
/*      */     }
/*      */ 
/* 1013 */     this.mdsql = (this.mdsql + " where id=" + '"' + strID + '"');
/*      */ 
/* 1015 */     System.out.println("mdAddByID:" + this.mdsql);
/*      */     try
/*      */     {
/* 1018 */       this.mdsql = new String(this.mdsql.getBytes("ISO8859-1"), "UTF-8");
/* 1019 */       System.out.println(this.mdsql);
/* 1020 */       this.dbcon.execUpdate(this.mdsql);
/*      */     } catch (Exception ex) {
/* 1022 */       flag = false;
/* 1023 */       ex.printStackTrace();
/*      */     }
/* 1025 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean del()
/*      */   {
/* 1030 */     dbConInit();
/*      */ 
/* 1032 */     boolean flag = true;
/* 1033 */     if ((this.idsw == null) || (this.idsw.equalsIgnoreCase(""))) {
/* 1034 */       this.delsql = ("delete from " + this.tablesw + " where btscode=" + '"' + this.wheresw + '"');
/*      */     }
/*      */     try
/*      */     {
/* 1038 */       this.delsql = new String(this.delsql.getBytes("ISO8859-1"), "UTF-8");
/* 1039 */       this.dbcon.execUpdate(this.delsql);
/*      */     } catch (Exception ex) {
/* 1041 */       flag = false;
/* 1042 */       ex.printStackTrace();
/*      */     }
/* 1044 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean delbyid(String strID)
/*      */   {
/* 1050 */     dbConInit();
/*      */ 
/* 1052 */     boolean flag = true;
/* 1053 */     this.delsql = ("delete from " + this.tablesw + " where id=" + '"' + strID + '"');
/*      */     try {
/* 1055 */       this.delsql = new String(this.delsql.getBytes("ISO8859-1"), "UTF-8");
/* 1056 */       this.dbcon.execUpdate(this.delsql);
/*      */     } catch (Exception ex) {
/* 1058 */       flag = false;
/* 1059 */       ex.printStackTrace();
/*      */     }
/* 1061 */     return flag;
/*      */   }
/*      */ 
/*      */   public boolean delbyBTSCode(String strBTSCode)
/*      */   {
/* 1067 */     dbConInit();
/*      */ 
/* 1069 */     boolean flag = true;
/* 1070 */     this.delsql = ("delete from " + this.tablesw + " where btscode=" + '"' + strBTSCode + '"');
/*      */     try {
/* 1072 */       this.delsql = new String(this.delsql.getBytes("ISO8859-1"), "UTF-8");
/* 1073 */       this.dbcon.execUpdate(this.delsql);
/*      */     } catch (Exception ex) {
/* 1075 */       flag = false;
/* 1076 */       ex.printStackTrace();
/*      */     }
/* 1078 */     return flag;
/*      */   }
/*      */ 
/*      */   public Boolean DisableTr()
/*      */   {
/* 1091 */     throw new Error("Unresolved compilation problem: \n\tType mismatch: cannot convert from boolean to Boolean\n");
/*      */   }
/*      */ 
/*      */   public Boolean AbleTr()
/*      */   {
/* 1104 */     throw new Error("Unresolved compilation problem: \n\tType mismatch: cannot convert from boolean to Boolean\n");
/*      */   }
/*      */ 
/*      */   public ResultSet excelve(String ve) throws Exception
/*      */   {
/* 1109 */     dbConInit();
/*      */ 
/* 1111 */     this.scsql = ("select * from " + ve);
/* 1112 */     this.scsql = new String(this.scsql.getBytes("ISO8859-1"), "UTF-8");
/* 1113 */     ResultSet rs = this.dbcon.execQuery(this.scsql);
/*      */ 
/* 1115 */     return rs;
/*      */   }
/*      */ }

/* Location:           E:\java\apache-tomcat-6.0.36\webapps\btsm\WEB-INF\classes\
 * Qualified Name:     btsm.bean.sqlBTSWork
 * JD-Core Version:    0.6.2
 */